package thread;

/**
 * @Author ZhangGJ
 * @Date 2022/02/07 16:27
 */

public class ThreadDemo extends Thread {

    public static void main(String[] args) {
        window t1 = new window();
        window t2 = new window();
        window t3 = new window();

        t1.setName("售票口1");
        t2.setName("售票口2");
        t3.setName("售票口3");

        t1.start();
        t2.start();
        t3.start();
    }

}


class window extends Thread {
    private static int ticket = 100; //将其加载在类的静态区，所有线程共享该静态变量

    @Override
    public void run() {
        System.out.println("=========: " + System.currentTimeMillis());
    }
}
